package com.study.sbsummary.config.constant;

/**
 * @author 10400
 * @create 2017-05-26 13:51
 */
public enum CodeEnum {
    /**
     * 返回值enum
     */
    GENERAL_SUCCESS(0, "success"),
    GENERAL_FAIL(-1, "failed"),
    ERROR_CODE_PARAM(1, "参数[%s]错误"),

    SERVER_BIZ(3, "服务器忙，请稍后重试"),
    SIGN_FAIL(6, "签名校验失败"),
    WRONG_PARAM(10, "传入参数错误"),
    ACCESS_ERROR(14, "无权访问"),
    AUDIT_PARAM_FAIL(33, "审核字段违法"),
    SIGN_TIME_OUT(34, "请求超时（api安全验签）"),
    DUPLICATE_QUERY(35, "请勿重复请求"),

    TOO_MANY_WORDS(600, "发表内容字数超出限制"),
    TOO_MANY_DOCS_A_DAY(601, "每天最多发表20篇"),
    ILLEGAL_CHAR(602, "内容中包含非法字符"),
    FORBIDDEN_USER(603, "该用户已被禁言"),
    UPLOAD_PIC_ERROR(604, "上传图片错误"),
    TOO_MANY_PICS(605, "每天最多上传200张图片"),
    HIGH_FREQUENCY(606, "频率过快，请稍后重试"),
    DOC_STATUS_ERROR(607, "入库状态错误"),
    NO_SUCH_UGC(608, "未找到符合要求的UGC"),
    USER_ERROR(609, "费本人操作"),
    ILLEGAL_ACTION(610, "操作非法"),
    ERROR_CODE_DB(611, "服务器忙,请稍后再试"),

    USER_LOGIN_VERIFY(15, "failed"),
    ERROR_CODE_PUBLISH_DOC_NUM(903, "今日发布数量已达上限"),

    MUSIC_EXCEPTION(1018, "音乐ID不存在"),
    CONTENT_EMPTY(602, "内容不能为空"),
    //ta拉黑了我
    ERROR_CODE_BLOCK_USER_BEBLOCK(855, "没有权限");
    private final Integer code;
    private final String reason;

    CodeEnum(Integer code, String status) {
        this.code = code;
        this.reason = status;
    }

    public Integer getCode() {
        return code;
    }

    public String getReason() {
        return reason;
    }

}
